package com.ydj.app.job;

import com.ydj.framework.task.BaseJob;
import com.ydj.app.service.BackendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

//@Component
public class DemoJob extends BaseJob {
    @Autowired
    BackendService backendService;

    @Override
    protected String name() {
        return "演示的JOB，使用时记得开了@Component";
    }

    @Override
    protected Boolean logEnable() {
        return false;
    }

    @Override
    protected boolean onlyRunAtMasterServer() {
        return true;
    }

    @Override
    public String cronExpress() {
//            2023-04-23 02:36:00
//            2023-04-23 02:37:00
//            2023-04-23 02:38:00
//            2023-04-23 02:39:00
//            2023-04-23 02:40:00
//            2023-04-23 02:41:00
//            2023-04-23 02:42:00
//            2023-04-23 02:43:00
//            2023-04-23 02:44:00
//            2023-04-23 02:45:00
        return "0 0/1 * * * ? ";
    }

    @Override
    public void doExecuteInternal() {

    }
}
